<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习七</title>
</head>
<body>
  <script>
    function Manager(name,id,salary,bonus){
        this.name = name;
        this.id = id;
        this.salary = salary;
        this.bonus = bonus;
        this.work = function () {
          console.log("工号为"+this.id+"基本工资为"+this.salary+"奖金为"+this.bonus+"的"+this.name+"正在努力的做着管理工作,分配任务,检查员工提交上来的代码.....")
        }
    }
    function Coder(name,id,salary,bonus){
      this.name = name;
      this.id = id;
      this.salary = salary;
      this.bonus = bonus;
      this.work = function () {
        console.log("工号为"+this.id+"基本工资为"+this.salary+"的"+this.name+"正在努力的写着代码......")
      }
    }

    var manager = new Manager("项目经理",123,15000,6000);
    manager.work();
    var coder = new Coder("程序员",135,10000);
    coder.work();
  </script>
</body>
</html>